const express = require('express')

const app = express()
app.use(require('cors')())
app.use(express.json())

app.use('/admin', express.static(__dirname + '/public/admin'))
app.use('/uploads', express.static(__dirname + '/uploads'))


require('./plugins/db')(app)
require('./routes/admin')(app)

app.listen(3030,() => {
  console.log('监听3030端口成功')
})